home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / hack / 2_3 / you.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-20  |  4.0 KB  |  127 lines

  1. /*    SCCS Id: @(#)you.h    2.3    87/12/12
  2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3.  
  4. #ifndef YOU_H
  5. #define YOU_H
  6.  
  7. #include "config.h"
  8. #include "onames.h"
  9. #include "permonst.h"
  10.  
  11. struct prop {
  12.  
  13. #define    TIMEOUT        007777    /* mask */
  14. #define    LEFT_RING    W_RINGL    /* 010000L */
  15. #define    RIGHT_RING    W_RINGR    /* 020000L */
  16. #define    INTRINSIC    040000L
  17. #define    LEFT_SIDE    LEFT_RING
  18. #define    RIGHT_SIDE    RIGHT_RING
  19. #define    BOTH_SIDES    (LEFT_SIDE | RIGHT_SIDE)
  20.  
  21.     long p_flgs;
  22.     int (*p_tofn)();    /* called after timeout */
  23. };
  24.  
  25. struct you {
  26.     xchar ux, uy;
  27.     schar dx, dy, dz;    /* direction of move (or zap or ... ) */
  28.     schar di;        /* direction of FF */
  29.     xchar ux0, uy0;        /* initial position FF */
  30.     xchar udisx, udisy;    /* last display pos */
  31.     char usym;        /* usually '@' */
  32.     schar uluck;
  33. #define    LUCKMAX        10    /* on moonlit nights 11 */
  34. #define    LUCKMIN        (-10)
  35.     int last_str_turn;    /* 0: none, 1: half turn, 2: full turn */
  36.                 /* +: turn right, -: turn left */
  37.     unsigned udispl;    /* @ on display */
  38.     unsigned ulevel;    /* 1 - 14 */
  39. #ifdef QUEST
  40.     unsigned uhorizon;
  41. #endif
  42.     unsigned utrap;        /* trap timeout */
  43.     unsigned utraptype;    /* defined if utrap nonzero */
  44. #define    TT_BEARTRAP    0
  45. #define    TT_PIT        1
  46. #ifdef SPIDERS
  47. #define    TT_WEB        2
  48. #endif
  49.     unsigned uinshop;    /* used only in shk.c - (roomno+1) of shop */
  50.  
  51. /* perhaps these #define's should also be generated by makedefs */
  52. #define    TELEPAT        LAST_RING        /* not a ring */
  53. #define    HTelepat    u.uprops[TELEPAT].p_flgs
  54. #define    Telepat        ((HTelepat) || (u.usym == 'E'))
  55. #define    FAST        (LAST_RING+1)        /* not a ring */
  56. #define    Fast        u.uprops[FAST].p_flgs
  57. #define    CONFUSION    (LAST_RING+2)        /* not a ring */
  58. #define    HConfusion    u.uprops[CONFUSION].p_flgs
  59. #define Confusion    ((HConfusion) || index("BIy", u.usym))
  60. #define    INVIS        (LAST_RING+3)        /* not a ring */
  61. #define    HInvis        u.uprops[INVIS].p_flgs
  62. #define Invis        ((HInvis) || u.usym == 'I')
  63. #define Invisible    (Invis && !See_invisible)
  64. #define    GLIB        (LAST_RING+4)        /* not a ring */
  65. #define    Glib        u.uprops[GLIB].p_flgs
  66. #define    PUNISHED    (LAST_RING+5)        /* not a ring */
  67. #define    Punished    u.uprops[PUNISHED].p_flgs
  68. #define    SICK        (LAST_RING+6)        /* not a ring */
  69. #define    Sick        u.uprops[SICK].p_flgs
  70. #define    BLINDED        (LAST_RING+7)        /* not a ring */
  71. #define    Blinded        u.uprops[BLINDED].p_flgs
  72. #define    WOUNDED_LEGS    (LAST_RING+8)        /* not a ring */
  73. #define Wounded_legs    u.uprops[WOUNDED_LEGS].p_flgs
  74. #define STONED        (LAST_RING+9)        /* not a ring */
  75. #define Stoned        u.uprops[STONED].p_flgs
  76. #define HALLUCINATION    (LAST_RING+10)        /* not a ring */
  77. #define Hallucination    u.uprops[HALLUCINATION].p_flgs
  78. #define    BLINDFOLDED    (LAST_RING+11)        /* not a ring */
  79. #define    Blindfolded    u.uprops[BLINDFOLDED].p_flgs
  80. #define Blind        (Blinded || Blindfolded)
  81. #define    BADGED        (LAST_RING+12)        /* not a ring */
  82. #define    Badged        u.uprops[BADGED].p_flgs
  83. #define LAST_PROP    (BADGED)        /* the last property */
  84. #define PROP(x) (x-RIN_ADORNMENT)       /* convert ring to index in uprops */
  85.     struct prop uprops[LAST_PROP+1];
  86.  
  87.     unsigned umconf;
  88.     char *usick_cause;
  89.     int mh, mhmax, mtimedone, umonnum;    /* for polymorph-self */
  90.     schar mstr, mstrmax;            /* for saving ustr/ustrmax */
  91. #if defined(KOPS) && defined(KAA)
  92.     unsigned ucreamed;
  93. #endif
  94.     unsigned uswallow;        /* set if swallowed by a monster */
  95.     unsigned uswldtim;        /* time you have been swallowed */
  96.     unsigned uhs;            /* hunger state - see hack.eat.c */
  97. #ifdef HARD
  98.     unsigned udemigod;        /* once you kill the wiz */
  99.     unsigned udg_cnt;        /* how long you have been demigod */
  100. #endif
  101. #ifdef RPH
  102.     int medusa_level;        /* level of wiz and medusa */
  103.     int wiz_level;
  104. #endif
  105. #ifdef STOOGES
  106.     int stooge_level;
  107. #endif
  108.     schar ustr,ustrmax;
  109.     schar udaminc;
  110.     schar uac;
  111.     int uhp,uhpmax;
  112. #ifdef SPELLS
  113.     int uen,uenmax;            /* magical energy - M. Stephenson */
  114. #endif
  115. #ifdef PRAYERS
  116.     int ugangr;            /* if the gods are angry at you */
  117.     int ublessed,ublesscnt;        /* blessing/duration from #pray */
  118. #endif
  119.     long int ugold,ugold0,uexp,urexp;
  120.     int uhunger;            /* refd only in eat.c and shk.c */
  121.     int uinvault;
  122.     struct monst *ustuck;
  123.     int nr_killed[CMNUM+2];        /* used for experience bookkeeping */
  124. };
  125.  
  126. #endif /* YOU_H /**/
  127.